package com.techsun.datanow.sync

import org.apache.spark.sql.SparkSession

trait TMysqlDataSync {
  /** VF UAT数据库示例
   * var mysqlUrl = "jdbc:mysql://cnazcrmmysql01t.mysql.database.chinacloudapi.cn:3306/cmstest?useSSL=true&requireSSL=false"
   * var mysqlDriver = "com.mysql.jdbc.Driver"
   * var mysqlUser = "vfcrmuat@cnazcrmmysql01t"
   * var mysqlPassword = "0nw#8jBG3@Dg!e"
   */

  /**
   * 同步工作方法
   *
   * @param spark         spark 会话对象
   * @param mysqlUrl      mysql连接地址
   * @param mysqlDriver   mysql连接驱动
   * @param mysqlUser     mysql用户名
   * @param mysqlPassword mysql密码
   * @param kuduMaster    kudu Master 节点
   * @return 同步成功或失败
   */
  def sync(spark: SparkSession, mysqlUrl: String, mysqlDriver: String, mysqlUser: String, mysqlPassword: String, kuduMaster: String, beginTime: Long, endTime: Long): Boolean
}
